{extend name="admin@index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    <input name="id" type="hidden" value="{$data.id}">

    <div class="layui-form-item">
        <label class="layui-form-label">名称</label>
        <div class="layui-input-block">
            <input type="text" name="row[name]" autocomplete="off" placeholder="名称" class="layui-input"
                   value="{$data.name}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label" style="width: 220px !important;">惊喜袋图片</label>
        <div class="layui-input-block">
            <ul class="layui-row list-inline plupload-preview" id="p-pic">
                <li class="file-item thumbnail"><a href="javascript:;">
                    <img data-image=""
                         onerror="this.src='/admin/ajax/icon?suffix=png';this.onerror=null;"
                         data-original="{$data.img}"
                         src="{$data.img}">
                </a>
                </li>
            </ul>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分类</label>
        <div class="layui-input-block">
            <input type="text" name="row[cate_name]" autocomplete="off" placeholder="分类" class="layui-input"
                   value="{$data.cate_name}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">标签名称</label>
        <div class="layui-input-block">
            <input type="text" name="row[labels]" autocomplete="off" placeholder="标签名称" class="layui-input"
                   value="{$data.labels}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">价格</label>
        <div class="layui-input-block">
            <input type="text" name="row[price]" autocomplete="off" placeholder="价格" class="layui-input"
                   value="{$data.price}" readonly="readonly">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">原价</label>
        <div class="layui-input-block">
            <input type="text" name="row[old_price]" autocomplete="off" placeholder="原价" class="layui-input"
                   value="{$data.old_price}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">当日库存</label>
        <div class="layui-input-block">
            <input type="text" name="row[inventory]" autocomplete="off" placeholder="当日库存" class="layui-input"
                   value="{$data.inventory}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">可买时间</label>
        <div class="layui-input-block">
            <input type="text" name="row[purchase_time]" autocomplete="off" placeholder="可买时间" class="layui-input"
                   value="{$data.purchase_time}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">可取时间</label>
        <div class="layui-input-block">
            <input type="text" name="row[qu_time]" autocomplete="off" placeholder="可取时间" class="layui-input"
                   value="{$data.qu_time}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">是否明天预售</label>
        <div class="layui-input-block">
            <input type="checkbox"
                   name="switch"
                   {if $data.is_ming==1}checked{/if}
                   lay-skin="switch"
                   lay-text="开启|关闭"
                   disabled
            >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">明日库存</label>
        <div class="layui-input-block">
            <input type="text" name="row[inventory_ming]" autocomplete="off" placeholder="明日库存" class="layui-input"
                   value="{$data.inventory_ming}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">明日可买时间</label>
        <div class="layui-input-block">
            <input type="text" name="row[purchase_time_ming]" autocomplete="off" placeholder="明日可买时间" class="layui-input"
                   value="{$data.purchase_time_ming}" readonly="readonly">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">明日可取时间</label>
        <div class="layui-input-block">
            <input type="text" name="row[qu_time_ming]" autocomplete="off" placeholder="明日可取时间" class="layui-input"
                   value="{$data.qu_time_ming}" readonly="readonly">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">你能获取什么&What?</label>
        <div class="layui-input-block">
            <textarea name="row[what]" placeholder="请输入内容" class="layui-textarea" readonly="readonly">{$data.what}</textarea>
<!--            <textarea  type="text" name="row[what]" autocomplete="off" placeholder="What?" class="layui-input"-->
<!--                       value="{$data.what}" readonly="readonly"></textarea>-->
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">审核状态</label>
        <div class="layui-input-block">
            <input type="radio" name="row[status]" value="2" title="待审核" {if $data.status==2}checked{/if}>
            <input type="radio" name="row[status]" value="1" title="审核通过" {if $data.status==1}checked{/if}>
            <input type="radio" name="row[status]" value="3" title="审核不通过" {if $data.status==3}checked{/if}>
        </div>
    </div>


    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit>提交</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use(['yznForm', 'laydate'], function () {
        var yznForm = layui.yznForm,
            laydate = layui.laydate;
        yznForm.bindevent($("form.layui-form"));
        laydate.render({
            elem: '#ID-laydate'
        });
    });
</script>
{/block}